package service.impl;

import bean.Admin;
import dao.IAdminDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.IAdminService;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class AdminServiceImpl implements IAdminService {
    @Resource
    private IAdminDao iAdminDao;

    @Override
    public List<Admin> queryAll() {
        return iAdminDao.queryAll();
    }

    @Override
    public Admin queryById(Integer mid) {
        return iAdminDao.queryById(mid);
    }

    @Override
    public void add(Admin admin) {
        iAdminDao.add(admin);
    }

    @Override
    public void update(Admin admin) {

        iAdminDao.update(admin);
    }

    @Override
    public void delete(Admin admin) {
        iAdminDao.delete(admin);
    }
}
